 
#
# A simple makefile for compiling  java classes
#

# define a makefile variable for the java compiler
#
JCC = javac

RM = rm
# define a makefile variable for compilation flags
# the -g flag compiles with debugging information
JA = java
#
JFLAGS = -g

#Address 127.0.0.1
ADDRESS = 127.0.0.1

# typing make along with filereader or generator or all will 
# execute different compiling functions as shown below
#'make filereader' will read the input from file and send it to the server attacking particular rules
#'make generator count' will generate count number of random input packets and send to server
#'make all' will perform the functionalities of both 'make filereader' and 'make generator' with default value of count 50
default: 
	$(JCC) $(JFLAGS) Client.java
	$(JA) Client $(ADDRESS)
	$(JA) Client $(ADDRESS) 50
	$(RM) *.class

filereader: 
	$(JCC) $(JFLAGS) Client.java
	$(JA) Client ${ARGS}
	$(RM) *.class

generator: 
	$(JCC) $(JFLAGS) Client.java
	$(JA) Client ${ARGS1} ${ARGS2}
	$(RM) *.class


# To start over from scratch, type 'make clean'. 
# Removes all .class files, so that the next make rebuilds
# them
#
clean:
	$(RM) *.class
